<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>发现</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/common.css" />
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../../css/aui-pull-refresh.css" />
    <link rel="stylesheet" type="text/css" href="../../css/swiper.min.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
</head>

<style>
  .aui-bar.aui-bar-light.share_nav{
    background:#fff;
    padding-top:2.5rem;
    position: fixed;
    box-shadow: 0rem 0rem 0.8rem 0rem
		rgba(126, 126, 126, 0.52);
    margin-top: 0 !important;
  }
  .share_nav .share_nav_title{
    height: 4.4rem;
    line-height: 4.4rem;
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    font-size:1.6rem;
    color:#000;
  }
  .share_nav .share_nav_left{
    top: 2.5rem;
    left: 1.3rem;
    position: absolute;
    z-index:10;
  }
  .share_nav .share_nav_right{
    top: 2.5rem;
    right: 1.3rem;
    position: absolute;
    z-index:10;
  }
  .share_nav .share_nav_right span{
    position: absolute;
    top:0.8rem;
    right:0;
    width:1.2rem;
    height:1.2rem;
    line-height: 1.2rem;
    color:#fff;
    background:#ed6a20;
    font-size:1rem;
    border-radius: 100%;
  }
  .share_nav img{
    height:1.7rem;
    margin-top:1.35rem;
  }
  .tizian_type{
    background:#fff;
    padding:0 0 0 1.3rem;
  }
  .tizian_type_f1{
    padding:1.6rem 0;
    border-bottom: 0.05rem solid #efefef;
    position: relative;
  }
  .tizian_type_f1 span{
    font-size:1.5rem;
    color:#333333;
    line-height: 1;
  }
  .tizian_type_f2_right{
    position: absolute;
    top:1.65rem;
    right:1.3rem;
    width:1.95rem;
    height:1.95rem;
  }
  .tizian_type_f2_right img{
    position: absolute;
    width:100%;
    height:100%;
    top:0;
    left:0;
  }
  .tizian_type_f2_right img.unsel{
    opacity: 1;
  }
  .tizian_type_f2_right img.sel{
    opacity: 0;
  }
  .tizian_type_f1.on .tizian_type_f2_right img.unsel{
    opacity: 0;
  }
  .tizian_type_f1.on .tizian_type_f2_right img.sel{
    opacity: 1;

  }

</style>
<body>
<div id="app">
  <header class="aui-bar aui-bar-nav aui-bar-light share_nav">
    <a class="aui-pull-left share_nav_left" onclick="close_win()">
      <img src="../../image/share/share_index_nav4.png" alt="">
    </a>
    <div class="aui-title share_nav_title">提现方式</div>
  </header>
  <!--  / warpper  -->
  <div class="warpper pad69">

    <div class="aui-refresh-content">
    <div class="tizian_type">
      <div class="tizian_type_f1">
        <span>选择提现至</span>
      </div>
      <div class="tizian_type_f1" v-for="(item,key) in list" :class="on_change==key?'on':''" @click="on_check(key)">
            <img :src="item.bank_logo" alt="" v-if="item.last_cardid?true:false" style="display:inline;float:left;position: relative;top:-0.8rem;">
            <span v-if="item.last_cardid?true:false" style="display:inline;float:left">尾号({{item.last_cardid}})</span>
            <span>{{item.bank_name}}</span>
        <div class="tizian_type_f2_right">
          <img src="../../image/share/share_tixian_1.png" alt="" class="unsel">
          <img src="../../image/share/share_tixian_2.png" alt="" class="sel">
        </div>
      </div>
    </div>
    </div>

  </div>
  <!--  / warpper  -->
</div>
</body>
</html>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/axios.min.js"></script>
<script type="text/javascript" src="../../script/axios-config.js"></script>
<script type="text/javascript" src="../../script/zepto.js"></script>
<script type="text/javascript" src="../../script/vue.min.js"></script>
<script type="text/javascript" src="../../script/swiper.min.js"></script>
<script type="text/javascript" src="../../script/utils.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="../../script/aui-tab.js"></script>
<script type="text/javascript" src="../../script/aui-scroll.js"></script>
<script type="text/javascript" src="../../script/aui-pull-refresh.js"></script>

<script type="text/javascript">

  apiready = function(){
    setRefresh()
    var vue = new Vue({
        el:"#app",
        data:{
            list:[
                // {bank_name:'微信支付',last_cardid:"",bank_id:"weixin"},
                // {bank_name:'支付宝支付',last_cardid:"",bank_id:"alipay"},
            ],
            on_change:"",
        },
        mounted:function(){
            var that = this
            var data = {
                token:$api.getStorage('token')
            }
            var list = this.list
            Axios.post(window.Url.bank_list,data).then(function(res){//获取银行卡列表
                console.log(JSON.stringify(res))
                if(res.status==1){
                    for(var a=0;a<res.list.length;a++){
                        list.push(res.list[a])
                    }
                    that.list =list
                }
            })
        },
        methods:{
            on_check:function(key){
                var that = this
                that.on_change=key
                api.sendEvent({
                    name: 'select_bank',
                    extra: {
                        bank: that.list[key],
                    }
                });
                api.closeWin({});
            }
        },
    })
  }

  //刷新
  function setRefresh(){
      var pullRefresh = new auiPullToRefresh({
          container: document.querySelector('.aui-refresh-content'),
          triggerDistance: 100
      }, function(ret) {

          if (ret.status == "success") {
              setTimeout(function() {
                  pullRefresh.cancelLoading(); //刷新成功后调用此方法隐藏
              }, 1500)
          }
      })
  }

  function close_win(){
    api.closeWin({});
  }



</script>
